home *** CD-ROM | disk | FTP | other *** search
/ PD Collection CD 1 / PD Collection CD 1.iso / textual / tex / files / !tex / TeXsource / commontex / h / tfm < prev    next >
Encoding:
Text File  |  1988-04-08  |  2.5 KB  |  128 lines

  1. /*
  2.  *    Copyright 1986, 1987 Pat Joseph Monardo. All rights reserved.
  3.  *    Copying of this file is granted according to the provisions 
  4.  *    specified in the file COPYING which must accompany this file.
  5.  */
  6.  
  7.  
  8. /*
  9.  *        tfm.h
  10.  */
  11.  
  12. global    byte_file        tfm_file;
  13.  
  14. global    mword    font_info[];
  15. global    ptr        fmem_ptr;
  16.  
  17. global    fourq    null_character;
  18.  
  19. global    fourq    font_check[];
  20. global    scal    font_size[];
  21. global    scal    font_dsize[];
  22. global    hword    font_params[];
  23. global    str        font_name[];
  24. global    str        font_area[];
  25. global    byte    font_bc[];
  26. global    byte    font_ec[];
  27. global    ptr        font_glue[];
  28. global    bool    font_used[];
  29. global    int        hyphen_char[];
  30. global    int        skew_char[];
  31.  
  32. global    int        char_base[];
  33. global    int        width_base[];
  34. global    int        height_base[];
  35. global    int        depth_base[];
  36. global    int        italic_base[];
  37. global    int        lig_kern_base[];
  38. global    int        kern_base[];
  39. global    int        exten_base[];
  40. global    int        param_base[];
  41.  
  42. global    fnt        font_ptr;
  43.  
  44. #define    char_exists(CI) \
  45.     ((CI).b0 > MIN_QUARTERWORD)
  46.  
  47. #define    char_info(F, C)    \
  48.     font_info[char_base[F] + (C)].qqqq
  49.  
  50. #define    char_width(F, CI) \
  51.     font_info[width_base[F] + CI.b0].sc
  52.  
  53. #define    char_height(F, CB) \
  54.     font_info[height_base[F] + (CB) / 16].sc
  55.  
  56. #define    char_depth(F, CB) \
  57.     font_info[depth_base[F] + (CB) % 16].sc
  58.  
  59. #define    char_italic(F, CI) \
  60.     font_info[italic_base[F] + qo(CI.b2) / 4].sc
  61.  
  62. #define    NO_TAG                0
  63. #define    LIG_TAG                1
  64. #define    LIST_TAG            2
  65. #define    EXT_TAG                3
  66.  
  67. #define    stop_bit(M)            M.b0
  68. #define    next_char(M)        M.b1
  69. #define    op_bit(M)            M.b2
  70. #define    rem_byte(M)            M.b3
  71. #define    STOP_FLAG            128
  72. #define    KERN_FLAG            128
  73.  
  74. #define    ext_top(M)            M.b0
  75. #define    ext_mid(M)            M.b1
  76. #define    ext_bot(M)            M.b2
  77. #define    ext_rep(W)            W.b3
  78.  
  79. #define    char_tag(CI) \
  80.     qo(CI.b2) % 4
  81.  
  82. #define    height_depth(CI) \
  83.     qo(CI.b1)
  84.  
  85. #define    lig_kern_start(F, CI) \
  86.     lig_kern_base[F] + rem_byte(CI)
  87.  
  88. #define    char_kern(F, CI) \
  89.     font_info[kern_base[F] + rem_byte(CI)].sc
  90.  
  91. #define    SLANT_CODE            1
  92. #define    SPACE_CODE            2
  93. #define    SPACE_STRETCH_CODE    3
  94. #define    SPACE_SHRINK_CODE    4
  95. #define    X_HEIGHT_CODE        5
  96. #define    QUAD_CODE            6
  97. #define    EXTRA_SPACE_CODE    7
  98.  
  99. #define    param(F, CODE)    \
  100.     font_info[param_base[F] + CODE].sc
  101.  
  102. #define    slant(F) \
  103.     param(F, SLANT_CODE)
  104.  
  105. #define    space(F) \
  106.     param(F, SPACE_CODE)
  107.  
  108. #define    space_stretch(F) \
  109.     param(F, SPACE_STRETCH_CODE)
  110.  
  111. #define    space_shrink(F) \
  112.     param(F, SPACE_SHRINK_CODE)
  113.  
  114. #define    x_height(F) \
  115.     param(F, X_HEIGHT_CODE)
  116.  
  117. #define    quad(F) \
  118.     param(F, QUAD_CODE)
  119.  
  120. #define    extra_space(F) \
  121.     param(F, EXTRA_SPACE_CODE)
  122.  
  123. fnt        read_font_info();
  124. int        find_font_dimen();
  125. int        scan_font_ident();
  126. int        char_warning();
  127. ptr        new_character();
  128.